
import numpy as np
# 分割数组
arr = np.arange(24).reshape(4,6)
print("原数组:\n", arr)
print("水平分割:\n", np.hsplit(arr, 2))
print("垂直分割:\n", np.vsplit(arr, 2))